Action hook 'comment_{$old_status}_to_{$new_status}'
in WP Core File wp-includes/comment.php at line 1819
Description
Fires when the comment status is in transition from one specific status to another. The dynamic portions of the hook name, `$old_status`, and `$new_status`, refer to the old and new comment statuses, respectively. Possible hook names include: - `comment_unapproved_to_approved` - `comment_spam_to_approved` - `comment_approved_to_unapproved` - `comment_spam_to_unapproved` - `comment_unapproved_to_spam` - `comment_approved_to_spam`
Occurrences
Filename |
Line Number |
wp-includes/comment.php |
1819 |
Parameters
Type |
Name |
Description |
WP_Comment |
$comment |
Comment object. |
PHP Doc
/**
* Fires when the comment status is in transition from one specific status to another.
*
* The dynamic portions of the hook name, `$old_status`, and `$new_status`,
* refer to the old and new comment statuses, respectively.
*
* Possible hook names include:
*
* - `comment_unapproved_to_approved`
* - `comment_spam_to_approved`
* - `comment_approved_to_unapproved`
* - `comment_spam_to_unapproved`
* - `comment_unapproved_to_spam`
* - `comment_approved_to_spam`
*
* @since 2.7.0
*
* @param WP_Comment $comment Comment object.
*/